home *** CD-ROM | disk | FTP | other *** search
- $DESCRIPTION:
- Version: 4.135
-
- The scope resolusion operator is not resolving scope as it should. Consider the following code.
-
- int a;
-
- main()
- {
- int a;
- a = 3;
- ::a = 2;
- cout << "local a = " << a << "\n"
- cout << "global a = " << ::a << "\n"
- }
-
- The code results in the output:
-
- local a = 2
- global a = 2
-
- The output should be
-
- local a = 3
- global a = 2
-
-
- $INVESTIGATION:
-
- $RESOLUTION:
-
- $VERIFICATION:
-
-